{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "乐学偶得版权所有  公众号：乐学Fintech  主讲人：William LX_LAB教研团队提供技术支持 正版视频： 网易云课堂：乐学偶得"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "14.写一个函数，能够将重要的事情说n遍"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "tips: 涉及到字符串的知识点（字符串相加），结构类似counter（计数器结构）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "def important_things_say_n_times(important_thing,n):\n",
    "    things_to_say = \"\"\n",
    "    for i in range(n):\n",
    "        things_to_say = things_to_say + important_thing\n",
    "    return things_to_say"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech 欢迎关注公众号乐学Fintech '"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "important_things_say_n_times(\"欢迎关注公众号乐学Fintech \",8)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
